package org.cqut.system.notice.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.cqut.framework.web.domain.BaseEntity;

/**
 * @author XiAoXu
 * @TableName cw_notice
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "cw_notice")
@Data
@Accessors(chain = true)
public class Notice extends BaseEntity {
    /**
     * 通知id
     */
    @TableId(value = "notice_id", type = IdType.AUTO)
    private Long noticeId;

    @TableField(value = "course_id")
    private Long courseId;

    /**
     * 通知标题
     */
    @TableField(value = "notice_title")
    private String noticeTitle;

    /**
     * 通知内容
     */
    @TableField(value = "notice_content")
    private String noticeContent;

    /**
     * 通知开始时间
     */
    @TableField(value = "notice_start_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date noticeStartTime;

    /**
     * 通知结束时间
     */
    @TableField(value = "notice_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date noticeEndTime;

    /**
     * 1:已保存 2:已发布 3:已结束
     */
    @TableField(value = "status")
    private Byte status;
}